using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static WaterCylinder.Object;

public class EntityAnimaController : MonoBehaviour
{   
    public EntityAnimaMapper entityMapper;
    public Animator animator;

    public void EntityDeadBegin(){
        entityMapper.entity.enabled = false;
        entityMapper.GetComponent<Rigidbody2D>().velocity = Vector2.zero;
    }
    public void EntityDeadEnd(){
        Delete(entityMapper.entity.gameObject);
    }

    private void Update() {
        switch(entityMapper.state){
            case AnimaState.Dead:
            animator.Play("Base.Dead");
            break;
        }
    }
}
